package com.xiangge.domain;

public class Teacher extends People{ // 使用extends进行继承共有属性

    public String subject;

    /*共有的属性可以使用继承
    public String name;
    public int age;
    public void eat(){
        System.out.println("吃饭");
    }*/

    public void teach(){
        System.out.println("教书");
    }
}
